﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace FirmaTransportowa
{
    public partial class StatisticsPanelVehicleView : Form
    {
        public StatisticsPanelVehicleView()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();
            SqlDataReader dr;
            SqlCommand sqlc;
            sqlc = new SqlCommand("SELECT * FROM Vehicles");
            dr = sqlc.ExecuteReader();
            dt.Load(dr);

            dataGridView1.DataSource = dt;
            dr.Close();
        }
    }
}
